<?php

require_once (dirname(__FILE__)."/gallery.class.php");

$req = new galleryRequest ();
$fps = new flickrPhotoSearch ($req);
$fps->get ();

?>
<html>
    <head>
        <title>Gallery - <?php echo $fps->fpObjects[$req->id]->title; ?></title>
        <link rel="stylesheet" href="gallery.css" type="text/css">
    </head>
    <body>
<?php

if (is_array ($fps->fpObjects)) {

?>
        <div id="pThumbs">
<?php

    foreach ($fps->fpObjects as $i => $pObject) {

?>
            <?php echo $req->id ($i, $pObject) . "\n"; ?>
<?php

    }

?>
        </div>
        <div id="pNavi">
            <div class="lArrow"><?php echo $req->pprev (); ?></div>
            <div class="lArrow"><?php echo $req->prev (); ?></div>
            <div id="pPage">
                <?php echo STR_PAGE; ?>&nbsp;
<?php

    for ($i = 1; $i <= $fps->pages; $i++) {

?>
                <?php echo $req->page ($i) . "&nbsp;\n"; ?>
<?php

    }

?>
            </div>
            <div class="rArrow"><?php echo $req->next ($fps->total); ?></div>
            <div class="rArrow"><?php echo $req->pnext ($fps->pages); ?></div>
        </div>
        <div id="pBig">
            <?php echo $req->big ($fps) . "\n"; ?>
        </div>
<?php

}
else {
    print_r ($fps->error ());
}

?>
        <div id="pFooter">
            <strong>phpFlickrGallery 0.1</strong> &copy; 2007 <a href="http://www.ploetner.it/dennis/kontakt">Dennis Pl&ouml;tner</a>
        </div>
    </body>
</html>
